package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.domain.User;
import com.itheima.service.UserService;


import java.util.List;


public class UserServiceImpl implements UserService {


        private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public List<User> findAll() {
        return userDao.findAll();
    }

    public void save(User user) {
        userDao.save(user);
    }

    public void delete(Integer sid) {
            userDao.delete(sid);
    }

    public void update(User user) {
        userDao.update(user);
    }

    public User findById(Integer sid) {
        return userDao.findById(sid);
    }
}
